<script type="text/javascript">
$(function(){
	$.post("reissueCard/getRegisterInfo",function(json){
		if(json.statusCode==DWZ.statusCode.error){
			navTabAjaxDone(json)
		}else{
			$(json).each(function(n,item){
				$("input[name='oldCitizenCardNo']",navTab.getCurrentPanel()).val(item.cardNo);
				$("input[name='cardpName']",navTab.getCurrentPanel()).val(item.cardpName);
				$("input[name='customerName']",navTab.getCurrentPanel()).val(item.p.customerName);
				$("input[name='paperTypeName']",navTab.getCurrentPanel()).val(item.p.paperType);
				$("input[name='paperNo']",navTab.getCurrentPanel()).val(item.p.paperNo);
				$("input[name='nationality']",navTab.getCurrentPanel()).val(item.p.nationality);		
				if(item.p.gender=='01'||item.p.gender.indexOf('男')){
					$("#sex3").attr("checked",true);
				}else if(item.p.gender=='02'||item.p.gender.indexOf('女')){
					$("#sex4").attr("checked",true);
				}
				if(item.p.prAddrDetailedInfo!=null){
					$("input[name='address']",navTab.getCurrentPanel()).val(item.p.prAddrDetailedInfo);
				}
				if(item.p.contactPostalcode!=null){
					$("input[name='postcode']",navTab.getCurrentPanel()).val(item.p.contactPostalcode);
				}
				if(item.p.email!=null){
					$("input[name='email']",navTab.getCurrentPanel()).val(item.p.email);
				}
				$("input[name='SupplementCardDate']",navTab.getCurrentPanel()).val(getDate(item.p.supplementDate));
				$("input[name='getCardDate']",navTab.getCurrentPanel()).val(getDate(item.p.getCardDate));
				$("input[name='phone']",navTab.getCurrentPanel()).val(item.p.homePhone);
				$("input[name='cellphone']",navTab.getCurrentPanel()).val(item.p.mobile);
			})
		}
		
	},"json");
	$.get("applicationSingle/getCardInfo",function(data){
		var content="<option value='' selected>请选择</option>";
		var i;
		$(data).each(function(n,item){
			for(i=0;i<item.certificates.length;i++){
				content+="<option value="+item.certificates[i].certificateType+">"
				+item.certificates[i].certificatesName+"</option>"
			}
			$("#agentPapertypeByReissue").html(content);
		});
	},"json");
});
</script>

<div class="pageContent">
	<form id="commitRegisterInfo" method="post" action="reissueCard/commitRegisterInfo" class="required-validate" onsubmit="return validateCallback(this,printViewPageAjaxDone);">
		<div class="pageFormContent" layoutH="96">
			<fieldset>
			<legend>个人信息</legend>
			<!--  <p>
				<label>卡产品：</label>
				<input  name="cardpName" type="text" size="30" readonly="readonly"/>
			</p> 
			<p>
				<label>原市民卡号：</label>
				<input name="oldCitizenCardNo"  type="text" size="30" readonly="readonly" />
			</p> -->
			<p>
				<label>姓名：</label>
				<input  type="text" class="" size="30"name="customerName" readonly="readonly" />		
			</p>
			<p>
				<label>证件类型：</label>
				<input type="text"   name="paperTypeName" size="30" readonly="readonly"/>
			</p>
			<p>
				<label>证件号码：</label>
				<input name="paperNo" class="" type="text" size="30" readonly="readonly" />
			</p>
			 <p>
		        <label>性别：</label>
		        <input id="sex3" type="radio" name="gender" value="01" />男  <input id="sex4" type="radio" name="gender"  value="02"/>女
            </P>
			<p>
				<label>民族：</label>
				<input  name="nationality" type="text" size="30" readonly="readonly"/>
			</p>
			<p>
				<label>通讯地址：</label>
				<input type="text" name="address" class="" size="30" readonly="readonly"/>
			</p>
			<p>
				<label>邮政编码：</label>
				<input type="text" name="postcode" class="" size="30" readonly="readonly"/>
			</p>
			<p>
				<label>电子邮箱：</label>
				<input type="text" name="email" class="" size="30" readonly="readonly"/>
			</p>
			<p>
				<label>联系电话：</label>
				<input name="phone" type="text" size="30" readonly="readonly"/>
			</p>
			<p>
				<label>手机：</label>
				<input name="cellphone" type="text" size="30" readonly="readonly"/>
			</p>
			<p>
				<label>质保期(月)：</label>
				<input type="text" size="30" />
			</p>
			</fieldset>
			<fieldset>
			<legend>原卡信息</legend>
			 <p>
				<label>卡产品：</label>
				<input  name="cardpName" type="text" size="30" readonly="readonly"/>
			</p> 
			<p>
				<label>原市民卡号：</label>
				<input name="oldCitizenCardNo"  type="text" size="30" readonly="readonly" />
			</p>
			<!-- <p>
				<label>补卡收费(工本费)：</label>
				<input name="supplementCardCharge" type="text" size="30" readonly="readonly"//>
			</p>  -->
			  <p>
				<label>补卡日期：</label>
				<input name="SupplementCardDate" type="text" size="30" readonly="readonly"/>
			</p>
			<p>
				<label>领卡日期：</label>
				<input name="getCardDate" type="text" size="30" readonly="readonly" />
			</p>
			</fieldset>
			<fieldset>
			<legend>代理人信息</legend>
			<p>
				<label>代理人证件类型：</label>
				<select flag="paperCode" id="agentPapertypeByReissue" name="agentPapertype" >
					
				</select>
			</p>
			<p>
				<label>代理人证件号码：</label>
				<input type="text" size="30" name="agentPaperNo" class="validIdentity"/>
			</p>
			<p>
				<label>代理人姓名：</label>
				<input type="text" size="30" name="agentName" class="validName"/>
			</p>
			<p>
				<label>代理人手机号码：</label>
				<input type="text" size="30" name="agentPhone" class="validMobile"/>
			</p>
			</fieldset>
			<p>
				<label>备注：</label>
				<input name="desc" type="text" size="30" maxlength="30"/>
			</p>
		</div>
		<div class="formBar">
			<ul>
				<li><div class="buttonActive"><div class="buttonContent"><button type="submit" class="valid">提交</button></div></div></li>
				<li>
					<a class="buttonActive" href="reissueCard/goReissueCard" target="navTab" rel="reissueCard" title="补卡"><span>返回</span></a>
				</li>
			</ul>
		</div>
	</form>
</div>
